home *** CD-ROM | disk | FTP | other *** search
- FIXES TO CODE FROM FILE HANDLING PART 3, APRIL 1996 (ISSUE 8)
- =============================================================
-
- One or two comments were made about the code from last month's issue. Thanks
- to the readers who let us know about the problems. Firstly, in the
- NAMES?.DPR projects, there is a call in the file NAMES?U2.PAS that looks
- like this:
-
- { Make current directory where EXE file is, just in case }
- ChDir(ExtractFilePath(Application.ExeName));
-
- Unfortunately, ExtractFilePath leaves a trailing backslash when given a full
- path, and this is unacceptable to ChDir. The new projects on this month's
- disks fix this by calling ExtractFileDir instead. This is a new Delphi 2
- routine that works exactly the same as ExtractFilePath, but ensures no
- trailing slashes. This keeps ChDir happy. Another issue that came up was
- that the program appeared to fall over if there was no data file - this is
- because exceptions get generated in the program. However the exceptions do
- get handled, and so to see the program running a bit more smoothly you can
- turn off Break on exception in the Options | Environment dialog on the
- Preferences page. Lastly, the program locked the file areas fine, but didn't
- unlock them properly. This has now been fixed as well.
-
- Brian Long
-
-
-